package com.manager.entity;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 文档对象 docs
 *
 * @author tao
 * @date 2021-07-11
 */
public class Docs implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 文件 ID */
    private Long id;

    /** 目录 id */
    private Long dirId;

    /** 项目 id */
    private Long projectId;

    /** 作者 id */
    private Long userId;

    /** 文档标题 */
    private String title;

    /** markdown 格式内容 */
    private String markdown;

    /** html 格式内容 */
    private String html;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deletedTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createdTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updatedTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setDirId(Long dirId)
    {
        this.dirId = dirId;
    }

    public Long getDirId()
    {
        return dirId;
    }
    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }

    public Long getProjectId()
    {
        return projectId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setMarkdown(String markdown)
    {
        this.markdown = markdown;
    }

    public String getMarkdown()
    {
        return markdown;
    }
    public void setHtml(String html)
    {
        this.html = html;
    }

    public String getHtml()
    {
        return html;
    }
    public void setDeletedTime(Date deletedTime)
    {
        this.deletedTime = deletedTime;
    }

    public Date getDeletedTime()
    {
        return deletedTime;
    }
    public void setCreatedTime(Date createdTime)
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime()
    {
        return createdTime;
    }
    public void setUpdatedTime(Date updatedTime)
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime()
    {
        return updatedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("dirId", getDirId())
            .append("projectId", getProjectId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("markdown", getMarkdown())
            .append("html", getHtml())
            .append("deletedTime", getDeletedTime())
            .append("createdTime", getCreatedTime())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
